package shiyan3;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int width;
	private int length;
	
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	public int getPerimeter(){
		return (width+length)*2;
	}
	public int getArea(){
		return width*length;
	}
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	
}
class Circle{
	private int radius;
	
	public Circle(int radius){
		this.radius=radius;
	}
	public int getPerimeter(){
		return (int) (2*radius*Math.PI);
	}
	public int getArea(){
		return (int) (radius*radius*Math.PI);
	}

	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
}
public class Sy33 {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		Rectangle[] R=new Rectangle[2];
		Circle[] C=new Circle[2];
		for(int i=0;i<R.length;i++){
			Rectangle r=new Rectangle(input.nextInt(), input.nextInt());
			R[i]=r;
		}
		for(int j=0;j<C.length;j++){
			Circle c=new Circle(input.nextInt());
			C[j]=c;
		}
	int sum1=R[0].getPerimeter()+R[1].getPerimeter()+C[0].getPerimeter()+C[1].getPerimeter();
	int sum2=R[0].getArea()+R[1].getArea()+C[0].getArea()+C[1].getArea();
	System.out.println(sum1);
	System.out.println(sum2);
	System.out.println(Arrays.deepToString(R));
	System.out.println(Arrays.deepToString(C));
	}

}
